// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'Id',
        footer: "Foots",
        cnName: '计量单位',
        name: 'Unit',
        url: "/Unit/",
        sortName: "Id"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"UnitCode":"","UnitName":"","Isdel":"","IsEnabled":"","Scale":"","Primaryunit":"","Code":""};
    const editFormOptions = [[{"title":"单位编码","required":true,"field":"UnitCode","type":"text"}],
                              [{"title":"单位名称","required":true,"field":"UnitName","type":"text"}],
                              [{"dataKey":"enable","data":[],"title":"是否是主单位","field":"Isdel","type":"radio"}],
                              [{"dataKey":"enable","data":[],"title":"是否启用","field":"IsEnabled","type":"radio"}],
                              [{"title":"与主单位换算比例","field":"Scale","type":"text"}],
                              [{"dataKey":"主单位","data":[],"title":"主单位","field":"Primaryunit","type":"select"}],
                              [{"title":"备注","field":"Code","type":"textarea"}]];
    const searchFormFields = {"UnitCode":"","UnitName":""};
    const searchFormOptions = [[{"title":"单位编码","field":"UnitCode","type":"like"},{"title":"单位名称","field":"UnitName","type":"like"}]];
    const columns = [{field:'Id',title:'主键',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'UnitCode',title:'单位编码',type:'string',width:120,require:true,align:'left'},
                       {field:'UnitName',title:'单位名称',type:'string',width:120,require:true,align:'left'},
                       {field:'Isdel',title:'是否是主单位',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'IsEnabled',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'Scale',title:'与主单位换算比例',type:'int',width:120,align:'left'},
                       {field:'Primaryunit',title:'主单位',type:'string',bind:{ key:'主单位',data:[]},width:120,hidden:true,align:'left'},
                       {field:'Code',title:'备注',type:'string',width:120,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}